feat(interop): allow specifying port to bind to#220
Closed
achingbrain wants to merge 1 commit intomasterfrom
Closed
feat(interop): allow specifying port to bind to#220achingbrain wants to merge 1 commit intomasterfrom
achingbrain wants to merge 1 commit intomasterfrom
Conversation
Ping listeners implementations seem to all bind to random ports during test runs, then report their multiaddr to redis. Dialers receive the multiaddr from redis and dial it. This is great when everything is under Docker. If you are trying to run one half of the test from locally running code and the other from a docker container in order to debug things you need to know the port the docker half will be listening on when you build the container in order to `EXPOSE` the port and make it available to the host machine, so the docker half can't use random ports. The change here is to specify a `port` env var that can be used to control this, defaulting to `'0'`, the value that seems to be used everywhere currently.
Contributor
|
This is fine by me. Although I wouldn't expect this change to be backported to all released versions. It would be easy to have newer versions support this though. As a workaround, you could use |
Contributor
|
@achingbrain this has been laying around here for more than a year. can we close this? |
Contributor
|
This is likely stale and no longer needed. If we do end up needing this, feel free to re-open. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ping listeners implementations seem to all bind to random ports during test runs, then report their multiaddr to redis. Dialers receive the multiaddr from redis and dial it.
This is great when everything is under Docker.
If you are trying to run one half of the test from locally running code and the other from a docker container in order to debug things you need to know the port the docker half will be listening on when you build the container in order to
EXPOSEthe port and make it available to the host machine, so the docker half can't use random ports.Running the non-local half of the test as a Docker image is preferable to building from source since it reduces the amount of assumed knowledge the developer has about how to build a rust/nim/zig/go/js/java project and doesn't require them to set up esoteric toolchains for what is hopefully an infrequent task.
The change here is to specify a
portenv var that can be used to control this, defaulting to'0', the value that seems to be used everywhere currently.